package com.ppt.android.base.ktx

import android.graphics.Color
import android.widget.TextView
import com.ppt.android.base.utils.SpannableStringUtils

/**
 *
 * @author ZouJiaCai
 * @since 2023/5/11 15:47
 */
fun TextView.formatSpannable(label: String,text: String?,lColor: String? = "#808080", tColor: String? = "#333333"): TextView {
    SpannableStringUtils.with(this)
        .append(label)
        .setForegroundColor(Color.parseColor(lColor))
        .append(text?: "")
        .setForegroundColor(Color.parseColor(tColor))
        .create()
    return this
}